<div class="main-container col1-layout">
    <div class="main">
        <div class="col-main">
<h3>All Goods</h3>
<div class="box best-selling">
<table border="0" cellspacing="0">
<tbody>
<?php
	$data = $dataProvider->getData();
	$count = $dataProvider->getTotalItemCount();
	for($i = 0 ;4*$i<$count;$i = $i+1)
	{
			echo '<tr class="odd">';
				echo '<td><img class="product-img" src="http://localhost/Eshop/skin/frontend/default/default/images/media/best_selling_img01.jpg" border="0" width="95" /></a>';
				
				echo '<div class="product-description">';
				
				echo '<p>Goods Name:'.CHtml::link($data[4*$i]->goods_name,array('goods/view','id'=>$data[4*$i]->goods_id)).'</p>';
				
				echo '<p>';
				
				echo 'Price:'.CHtml::encode($data[4*$i]->goods_price).'</a>';
				
				echo '</p>';
				
				echo '<p>'.CHtml::link('Add to cart',array('cart/create','goods_id'=>$data[4*$i]->goods_id)).'</p>';
				echo '</div>';
				echo '</td>';
				if(4*$i+1>=$count){
					echo '</tr>';
					break;
						
				}
				echo '<td><a href=""><img class="product-img" src="http://localhost/Eshop/skin/frontend/default/default/images/media/best_selling_img01.jpg" border="0" width="95" /></a>';
				
				echo '<div class="product-description">';
				
				echo '<p>Goods Name:'.CHtml::link($data[4*$i+1]->goods_name,array('goods/view','id'=>$data[4*$i+1]->goods_id)).'</p>';
				
				echo '<p>';
				
				echo 'Price:'.CHtml::encode($data[4*$i+1]->goods_price).'</a>';
				
				echo '</p>';
				echo '<p>'.CHtml::link('Add to cart',array('cart/create','goods_id'=>$data[4*$i+1]->goods_id)).'</p>';
				echo '</div>';
				echo '</td>';
			echo '</tr>';
				if(4*$i+2>=$count){
					break;
				}
			echo '<tr class="even">';
				echo '<td><a href=""><img class="product-img" src="http://localhost/Eshop/skin/frontend/default/default/images/media/best_selling_img01.jpg" border="0" width="95" /></a>';
				
				echo '<div class="product-description">';
				
				echo '<p>Goods Name:'.CHtml::link($data[4*$i+2]->goods_name,array('goods/view','id'=>$data[4*$i+2]->goods_id)).'</p>';
				
				echo '<p>';
				
				echo 'Price:'.CHtml::encode($data[4*$i+2]->goods_price).'</a>';
				
				echo '</p>';
				
				echo '<p>'.CHtml::link('Add to cart',array('cart/create','goods_id'=>$data[4*$i+2]->goods_id)).'</p>';
				
				echo '</div>';
				echo '</td>';
				if(4*$i+3>=$count){
					echo '</tr>';
					break;	
				}
				echo '<td><a href=""><img class="product-img" src="http://localhost/Eshop/skin/frontend/default/default/images/media/best_selling_img01.jpg" border="0" width="95" /></a>';
				
				echo '<div class="product-description">';
				
				echo '<p>Goods Name:'.CHtml::link($data[4*$i+3]->goods_name,array('goods/view','id'=>$data[4*$i+3]->goods_id)).'</p>';
				
				echo '<p>';
				
				echo 'Price:'.CHtml::encode($data[4*$i+3]->goods_price).'</a>';
				
				echo '</p>';
				
				echo '<p>'.CHtml::link('Add to cart',array('cart/create','goods_id'=>$data[4*$i+3]->goods_id)).'</p>';
				
				echo '</div>';
				echo '</td>';
				echo '</tr>';
	} 
?>
</tbody>
</table>
</div>
</div>
</div>
</div>